﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="BF.Web.pages.BaseSystem.FunctionManagement.WebForm1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href='/script/ext3.4/resources/css/ext-all.css' rel='stylesheet' type='text/css' />
    <script src='/script/ext3.4/adapter/ext/ext-base.js' type='text/javascript'></script>
    <script src='/script/ext3.4/ext-all.js' type='text/javascript'></script>
    <script src="/script/ext3.4/ux/CheckboxGroup.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">
        Ext.onReady(function () {
            var myCheckboxGroup = new Ext.form.CheckboxGroup({
                id: 'myGroup',
                xtype: 'checkboxgroup',
                renderTo: 'form-cb',
                fieldLabel: 'Single Column',
                itemCls: 'x-check-group-alt',
                columns: 3,
                items: [
                    { boxLabel: '唱歌', name: '1' },
                    { boxLabel: '游泳', name: '2', checked: true },
                    { boxLabel: '看书', name: '3' },
                    { boxLabel: '旅游', name: '4' },
                    { boxLabel: '游戏', name: '5' },
                    { boxLabel: '睡觉', name: '6' }
                ]
            });
            myCheckboxGroup.render("myGroup");
            //CheckboxGroup取值方法   
            //            for (var i = 0; i < myCheckboxGroup.items.length; i++) {
            //                if (myCheckboxGroup.items.itemAt(i).checked) {
            //                    alert(myCheckboxGroup.items.itemAt(i).name);
            //                }
            //            }
        });  
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="myGroup">
    </div>
    </form>
</body>
</html>
